<?php
define('MICROTIME_START',microtime(TRUE));

error_reporting(E_ALL);
ini_set('display_errors','On');
header('Content-type: text/plain;charset=utf-8');

$start = microtime(TRUE);
require_once 'init.inc.php';
$db->truncate('lots_of_rows');
$q = $db->insert('lots_of_rows')->unbuffered();
$a = array();
for ($i = 0; $i <= 9; ++$i) {$a[] = str_repeat($i,255);}
for ($i = 1; $i <= 10000; ++$i)
{
 $q->row(array(
	 'first' => &$a[rand(0,9)],
	 'second'	=> &$a[rand(0,9)],
	 'third'	=> &$a[rand(0,9)]
 ));
 if ($i % 100 == 0)
 {
  echo $i." rows filled\n";
  $q->execute();
 }
}
echo microtime(TRUE)-$start;